home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Online / hsc / source / hsclib / ldebug.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-02  |  4.2 KB  |  159 lines

  1. /*
  2.  * This source code is part of hsc, a html-preprocessor,
  3.  * Copyright (C) 1995-1997  Thomas Aglassinger
  4.  *
  5.  * This program is free software; you can redistribute it and/or modify
  6.  * it under the terms of the GNU General Public License as published by
  7.  * the Free Software Foundation; either version 2 of the License, or
  8.  * (at your option) any later version.
  9.  *
  10.  * This program is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  * GNU General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program; if not, write to the Free Software
  17.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  *
  19.  */
  20. /*
  21.  * hsclib/ldebug.h
  22.  *
  23.  * debugging defines for hsc
  24.  */
  25.  
  26. #ifndef HSCLIB_LDEBUG_H
  27. #define HSCLIB_LDEBUG_H
  28.  
  29. /*
  30.  * debugging switches
  31.  *
  32.  * if switch is set to "1", requested debugging information is
  33.  * displayed if also the "-debug" switch is enabled when
  34.  * starting hsc
  35.  */
  36. #ifdef DEBUG
  37.  
  38. /* this debugging info is displayed only
  39.  * if the  switch "-debug" has been enabled
  40.  */
  41. #undef  DEBUG
  42. #define DEBUG         1         /* misc. debugging */
  43. #define DEBUG_ATTRVAL 1         /* display attribute values */
  44. #define DEBUG_CONFIG  1         /* display config messages */
  45. #define DEBUG_DEFATTR 1         /* display defined attributes */
  46. #define DEBUG_DEFENT  1         /* display defined entities */
  47. #define DEBUG_DEFTAG  1         /* display defined tags */
  48. #define DEBUG_IF      1         /* display if/else */
  49. #define DEBUG_MACRO   1         /* display macro */
  50. #define DEBUG_SIZE    1         /* display getsize-info */
  51. #define DEBUG_URI     1         /* display uri conversion */
  52. #define DEBUG_ID      1         /* display IDs added/checked/.. */
  53. #define DEBUG_HSCLIB_OUTPUT 0
  54.  
  55. /* this debugging info is displayed always,
  56.  * independant of the hscprc's debug-flag */
  57. #define DEBUG_ATTR    0         /* display new/del attribute */
  58. #define DEBUG_ENTITY  0         /* display new/del entity */
  59.  
  60. /* ugly debugging info */
  61. #ifndef DEBUG_UGLY
  62. #define DEBUG_UGLY
  63. #endif
  64.  
  65. #else
  66.  
  67. #define DEBUG         0         /* misc. debugging */
  68. #define DEBUG_ATTRVAL 0         /* display attribute values */
  69. #define DEBUG_CONFIG  0         /* display config messages */
  70. #define DEBUG_DEFATTR 0         /* display defined attributes */
  71. #define DEBUG_DEFENT  0         /* display defined entities */
  72. #define DEBUG_DEFTAG  0         /* display defined tags */
  73. #define DEBUG_IF      0         /* display if/else */
  74. #define DEBUG_MACRO   0         /* display macro */
  75. #define DEBUG_SIZE    0         /* display getsize-info */
  76. #define DEBUG_URI     0         /* display uri conversion */
  77. #define DEBUG_ID      0         /* display uri conversion */
  78. #define DEBUG_HSCLIB_OUTPUT 0
  79.  
  80. #define DEBUG_ATTR    0         /* display new/del attribute */
  81. #define DEBUG_ENTITY  0         /* display new/del entity */
  82.  
  83. #endif
  84.  
  85. /* debug message prefix for hsclib-modules */
  86. #define DHL "*hsclib* "
  87.  
  88. /*
  89.  * debugging defines
  90.  */
  91. #if DEBUG
  92. #define D(x) if (hp->debug) x
  93. #else
  94. #define D(x)                    /* nufin */
  95. #endif
  96.  
  97. #if DEBUG
  98. #define DMSG(msg) ((hp->debug) ? (fprintf( stderr, DHL msg "\n" )) : 0 )
  99. #else
  100. #define DMSG(msg)               /* nufin */
  101. #endif
  102.  
  103. #if DEBUG_ATTRVAL
  104. #define DAV(x) if ( hp->debug ) x
  105. #else
  106. #define DAV(x)                  /* nufin */
  107. #endif
  108.  
  109. #if DEBUG_CONFIG
  110. #define DC(x) if ( hp->debug ) x
  111. #else
  112. #define DC(x)                   /* nufin */
  113. #endif
  114.  
  115. #if DEBUG_DEFATTR
  116. #define DDA(x) if ( hp->debug ) x
  117. #else
  118. #define DDA(x)                  /* nufin */
  119. #endif
  120.  
  121. #if DEBUG_DEFENT
  122. #define DDE(x) if ( hp->debug ) x
  123. #else
  124. #define DDE(x)                  /* nufin */
  125. #endif
  126.  
  127. #if DEBUG_DEFTAG
  128. #define DDT(x) if ( hp->debug ) x
  129. #else
  130. #define DDT(x)                  /* nufin */
  131. #endif
  132.  
  133. #if DEBUG_IF
  134. #define DIF(x) if ( hp->debug ) x
  135. #else
  136. #define DIF(x)                  /* nufin */
  137. #endif
  138.  
  139. #if DEBUG_MACRO
  140. #define DMC(x) if ( hp->debug ) x
  141. #else
  142. #define DMC(x)                  /* nufin */
  143. #endif
  144.  
  145. #if DEBUG_SIZE
  146. #define DSZ(x) if ( hp->debug ) x
  147. #else
  148. #define DSZ(x)                  /* nufin */
  149. #endif
  150.  
  151. #if DEBUG_URI
  152. #define DU(x) if ( hp->debug ) x
  153. #else
  154. #define DU(x)                   /* nufin */
  155. #endif
  156.  
  157. #endif /* HSCLIB_LDEBUG_H */
  158.  
  159.